
package ro.qi.framework.sys.security.entities;

import ro.qi.framework.sys.entities.Entity;

public class SecurityGroupAccountCollection extends Entity {

	public SecurityGroupAccountCollection() {
		super();
	}

	public SecurityGroupAccountCollection(int groupId) {
		super();
		setGroupId(groupId);
		select();
	}

	public void setGroupId(int value) {
		setValue("groupId", value);
	}

	public int getCollectionSize() {
		return getCollectionSize("accounts");
	}

	public int getAccountId(int index) {
		return getCollectionIntValue("accounts", "accountId", index);
	}

	public SecurityAccount getAccount(int index) {
		return new SecurityAccount(getAccountId(index));
	}

}
